<!DOCTYPE html>
<html lang="zh-cn">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>
        <?=htmlspecialchars($title??'')?>
    </title>
    <meta name="description" content="<?=htmlspecialchars($description??'')?>">
    <meta name="keyword" content="<?=htmlspecialchars($keyword??'')?>">
    <link rel="shortcut icon" href="/images/icon.jpg" type="image/x-icon">
    <!-- link标签加上common属性 将全局使用 -->
    <link rel="stylesheet" common href="layui/css/layui.css">
    <link rel="stylesheet" href="index.css">
    <script src="layui/layui.js"></script>
    <!-- md编辑器 -->
    <link rel="stylesheet" common href="/editor.md/css/editormd.min.css">
    <script>
        // 配置
        layui.config({
            base: "model/",
        }).use(["app", "api"], function () {
            let app = layui.app
            let api = layui.api

            //渲染
            app.render({
                main: "home",// 默认渲染首页
                view: "main-view",//渲染main-view标签
                mode: "hash", // 路由模式 history 或者 hash
                route: "/route.json", // 路由链接
            })

            api.http(`<?=htmlspecialchars($api??'')?>`)

        })
    </script>
    <script src="index.js"></script>
</head>

<body>
    <!-- 头部 -->
    <header class="layui-header layui-bg-light">
        <div class="layui-logo">
            <h1 class="layui-font-green">
                <?=htmlspecialchars($title??'')?>
            </h1>
            <p class="layui-font-gray">
                <?=htmlspecialchars($min_title??'')?>
            </p>
        </div>
        <div class="layui-menu layui-hide-lg">
            <a href="javascript:;" id="header-menu">
                <i class="layui-icon layui-icon-more-vertical"></i>
            </a>
        </div>
        <ul class="layui-nav layui-bg-gray layui-bg-light layui-show-lg-block">
            <li class="layui-nav-item layui-this">
                <a href="javascript:;" onclick="layui.app.navigateTo('home')">首页</a>
            </li>
            <li class="layui-nav-item">
                <a href="javascript:;" onclick="layui.app.navigateTo('note')">笔记</a>
            </li>
            <li class="layui-nav-item">
                <a href="javascript:;" onclick="layui.app.navigateTo('project')">项目</a>
            </li>
        </ul>
    </header>
    <div style="padding-top: 70px;"></div>
    <!-- 内容 -->
    <main-view></main-view>
    <!-- 底部 -->
    <footer class="layui-bg-black layui-footer">
        <div class="footer-box layui-container">
            <div class="footer-item">
                <h2>技术交流</h2>
                <!-- <img src="<?=htmlspecialchars($api??'')?><?=htmlspecialchars($qrcode??'')?>" alt="公众号"> -->
            </div>
            <div class="footer-item">
                <h2>与我联系</h2>
                <p>
                    <i class="layui-icon layui-icon-login-qq layui-font-green"></i>
                    <a class="layui-font-gray"
                        href="http://wpa.qq.com/msgrd?v=3&uin=<?=htmlspecialchars($qq??'')?>&site=qq&menu=yes"
                        target="_blank" rel="QQ">
                        QQ :
                        <?=htmlspecialchars($qq??'')?>
                    </a>
                </p>
                <p>
                    <i class="layui-icon layui-icon-login-wechat layui-font-green"></i>
                    <a class="layui-font-gray" href="javascript:;" target="_blank" rel="微信">
                        微信 :
                        <?=htmlspecialchars($wechat??'')?>
                    </a>
                </p>
            </div>
            <div class="footer-item">
                <h2>相关链接</h2>
                <p>
                    <i class="layui-icon layui-icon-github layui-font-green"></i>
                    <a class="layui-font-gray" href="<?=htmlspecialchars($github??'')?>" target="_blank" rel="GITHUB">
                        GITHUB
                    </a>
                </p>
                <p>
                    <i class="layui-icon layui-icon-edge layui-font-green"></i>
                    <a class="layui-font-gray" href="<?=htmlspecialchars($gitee??'')?>" target="_blank" rel="GITEE">
                        码云
                    </a>
                </p>
            </div>
        </div>
        <a class="layui-font-gray" href="https://beian.miit.gov.cn/" target="_blank">粤ICP备2021157827号</a>
    </footer>
</body>

</html>